<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/default}">
<head>
    <title>联系人详情</title>
</head>
<body>
    <div layout:fragment="content">
        <div class="d-flex justify-content-between align-items-center mb-3">
            <h1>联系人详情</h1>
            <div>
                <a th:href="@{/contact/edit/{id}(id=${contact.id})}" class="btn btn-primary">编辑</a>
                <a th:href="@{/contact/list}" class="btn btn-secondary ml-2">返回列表</a>
            </div>
        </div>
        
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>姓名</label>
                            <p class="form-control-static" th:text="${contact.name}">-</p>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>电话</label>
                            <p class="form-control-static" th:text="${contact.phone}">-</p>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>电子邮箱</label>
                            <p class="form-control-static" th:text="${contact.email}">-</p>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>职位</label>
                            <p class="form-control-static" th:text="${contact.position}">-</p>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>所属客户</label>
                            <p class="form-control-static" th:text="${contact.customerName}">-</p>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>是否主要联系人</label>
                            <p class="form-control-static">
                                <span th:if="${contact.isPrimary}" class="badge badge-success">是</span>
                                <span th:unless="${contact.isPrimary}" class="badge badge-secondary">否</span>
                            </p>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>备注</label>
                            <p class="form-control-static" th:text="${contact.remark}">-</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html> 